SUPPORT / SAMPLES & SAS NOTES
 

Support

Problem Note 50450: Decimals are truncated to seven digits when you export data to Excel XLSX files using the XLSX driver

DetailsAboutRate It
Decimals are truncated to seven digits when you export data to XLSX files using the XLSX driver. Here is an example:
data a;
   a=1.123456789;
 run;

proc export data=a 
            dbms=xlsx 
            outfile='c:\sastest\mydigits.xlsx' replace;
     sheet='fred';
run;
When you open the workbook, you see that the value is rounded to 7 digits, as shown below:
1.1234568

Workarounds

To resolve the problem, do one of the following:

  • Use DBMS=EXCELCS or DBMS=EXCEL, depending on which operating system and version of Microsoft Office are installed.
    • Use DBMS=EXCEL if you are using SAS and Excel on Windows and the bits match. That is, 32-bit SAS and 32-bit Office, or 64-bit SAS and 64-bit Office.
    • Use DBMS=EXCELCS if the bit architecture of SAS and Windows do not match or if you are not running on a Windows platform.
  • Or install SAS® 9.4. The number of digits has been expanded to 15 in SAS 9.4.


Operating System and Release Information

Product FamilyProductSystemSAS Release
ReportedFixed*
SAS SystemSAS/ACCESS Interface to PC FilesMicrosoft® Windows® for x649.3 TS1M29.4 TS1M0
Microsoft Windows Server 2003 Enterprise Edition9.3 TS1M2
Microsoft Windows Server 2003 Standard Edition9.3 TS1M2
Microsoft Windows Server 2003 Datacenter Edition9.3 TS1M2
Microsoft Windows Server 2003 for x649.3 TS1M2
Microsoft Windows Server 20089.3 TS1M2
Microsoft Windows Server 2008 R2 for x649.3 TS1M29.4 TS1M0
Microsoft Windows Server 2008 for x649.3 TS1M29.4 TS1M0
Microsoft Windows XP Professional9.3 TS1M2
Windows 7 Enterprise 32 bit9.3 TS1M2
Windows 7 Enterprise x649.3 TS1M29.4 TS1M0
Windows 7 Home Premium 32 bit9.3 TS1M2
Windows 7 Home Premium x649.3 TS1M2
Windows 7 Professional 32 bit9.3 TS1M2
Windows 7 Professional x649.3 TS1M29.4 TS1M0
Windows 7 Ultimate 32 bit9.3 TS1M2
Windows 7 Ultimate x649.3 TS1M2
Windows Vista9.3 TS1M2
Windows Vista for x649.3 TS1M2
64-bit Enabled AIX9.3 TS1M29.4 TS1M0
64-bit Enabled HP-UX9.3 TS1M29.4 TS1M0
64-bit Enabled Solaris9.3 TS1M29.4 TS1M0
HP-UX IPF9.3 TS1M29.4 TS1M0
Linux9.3 TS1M29.4 TS1M0
Linux for x649.3 TS1M29.4 TS1M0
Solaris for x649.3 TS1M29.4 TS1M0
* For software releases that are not yet generally available, the Fixed Release is the software release in which the problem is planned to be fixed.